// pages/mine/record/record.js

let {
  api_QueryExchangeRecord
} = require("../../api/getData.js")

const app = getApp()

Page({

  /**
   * 页面的初始数据
   */
  data: {
    recordList:[]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var data_post = {
      userid:app.globalData.userInfo.id
    }
    api_QueryExchangeRecord(data_post, (res) => {
      var tmpList = []
      res.data.forEach(i => {
        tmpList.push(i)
      })
      this.setData({
        recordList: tmpList,
      })
    })
  },

})